package com.wxw.BaseLibrary.http.soap;

import org.apache.http.Header;

import java.net.HttpCookie;
import java.util.List;
import java.util.Map;

/**
 * Created by david on 2016/5/11.
 */
public interface Response<T> {
    /**
     * Get the requested url.
     *
     * @return URL.
     */
    String url();

    /**
     * RequestMethod.
     *
     * @return {@link RequestMethod}.
     */
    RequestMethod getRequestMethod();

    /**
     * Ask for success.
     *
     * @return True: Succeed, false: failed.
     */
    boolean isSucceed();

    /**
     * Get http response headers.
     *
     * @return {@code Map<String, String>}.
     */
    Map<String, String> getHeaders();

    /**
     * Get http response code.
     *
     * @return
     */
    int getResponseCode();
    /**
     * Get raw data.
     *
     * @return {@code byte[]}.
     */
    byte[] getByteArray();

    /**
     * Get request results.
     *
     * @return {@link T}.
     */
    T get();

    /**
     * Get Error Message.
     *
     * @return The exception.
     */
    Exception getException();

    /**
     * Gets the tag of request.
     *
     * @return {@link Object}.
     */
    Object getTag();

    /**
     * Gets the millisecond of request.
     *
     * @return {@link Long}.
     */
    long getNetworkMillis();
}
